#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# @Time: 2024-03-04 23:06
# @Despcription: 计算模块

global_var = 30

def add(a, b):
    ret = a + b
    print("{} + {} = {}".format(a, b, ret))
    return ret + global_var

def minus(a, b):
    ret = a - b
    print("{} - {} = {}".format(a, b, ret))
    return ret

def multi(a, b):
    ret = a * b
    print("{} x {} = {}".format(a, b, ret))
    return ret

def divide(a, b):
    if (b == 0):
        print("除数不能为0")
        return None
    ret = a / b
    print("{} / {} = {}".format(a, b, ret))
    return ret

def info():
    print("[info] module name: {}".format(__name__))


# 以脚本的方式执行模块文件时， 全局变量__name__会变为字符串"__main__"
if(__name__ == "__main__"):
    import sys
    print("argc:{} argv:{}".format( sys.argv.length, sys.argv))
